package com.lgcns.andteam2.todaymenu.item;

import java.util.ArrayList;

import com.lgcns.andteam2.todaymenu.Constants;

/**
 * 주간 메뉴에서 1일치의 정보를 나타낸다.
 */
public class WeekDayMenu {
    private String date;
    private String day;
    private String[] gubunCode = { 
            Constants.BREAKFAST_GUBUN_CODE,
            Constants.LUNCH_GUBUN_CODE,
            Constants.DINNER_GUBUN_CODE
    };
    private String[] gubun = {
            Constants.BREAKFAST_GUBUN,
            Constants.LAUNCH_GUBUN,
            Constants.DINNER_GUBUN
    };
    
    public class CornerMenu {
        public ArrayList<String> cornerList = new ArrayList<String>();
        public ArrayList<String> menuList = new ArrayList<String>();
    }
    
    public CornerMenu[] cornerMenus;
    
    public WeekDayMenu() {
        cornerMenus = new CornerMenu[]{ new CornerMenu(), new CornerMenu(), new CornerMenu() };
    }
    
    /**
     * YYYYMMDD
     * @return
     */
    public String getDate() {
        return date;
    }
    /**
     * YYYYMMDD
     * @param date
     */
    public void setDate(String date) {
        this.date = date;
    }
    /**
     * 요일
     * @return
     */
    public String getDay() {
        return day;
    }
    /**
     * 요일
     * @param date
     */
    public void setDay(String day) {
        this.day = day;
    }
    public String getGubunCode(int index) {
        return gubunCode[index];
    }
    public String getGubun(int index) {
        return gubun[index];
    }

    public void addCorner(int gubunIndex, String corner) {
        cornerMenus[gubunIndex].cornerList.add(corner);
    }
    
    public String getCorner(int gubunIndex, int cornerIndex) {
        return cornerMenus[gubunIndex].cornerList.get(cornerIndex);
    }
    
    public int getCornerSize(int gubunIndex) {
        return cornerMenus[gubunIndex].cornerList.size();
    }
    
    public void addMenu(int gubunIndex, String menu) {
        cornerMenus[gubunIndex].menuList.add(menu);
    }
    
    public String getMenu(int gubunIndex, int menuIndex) {
        return cornerMenus[gubunIndex].menuList.get(menuIndex);
    }
    
    public int getMenuSize(int gubunIndex) {
        return cornerMenus[gubunIndex].menuList.size();
    }
}
